<template>
  <el-main @click.stop="selectField">
    <slot></slot>
    <draggable-list :widget="widget"></draggable-list
  ></el-main>
</template>

<script setup>
import { assignmentWidget } from "@/views/pageDesign/components/globalVariable";
import draggableList from "@/components/draggableList.vue";

defineOptions({
  name: "mainWidget",
  inheritAttrs: false,
});

let $props = defineProps({
  widget: {
    type: Object,
    required: true,
  },
});

let selectField = () => {
  assignmentWidget($props.widget);
};
</script>

<style lang="scss" scoped>
.el-main {
  position: relative;
  background: #ecf5ff;
  min-height: 200px;
}
</style>
